package com.example.demo.mall.entity;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单实体类
 * 注意：order是SQL关键字，需要用@TableName明确指定表名
 */
@Data
@TableName("`order`") // 使用反引号转义
public class Order {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderNo;
    private Long userId;
    private BigDecimal totalAmount;
    private BigDecimal paymentAmount;
    private Integer status; // 0-待付款 1-已付款 2-已发货 3-已完成 4-已取消
    private Date paymentTime;
    private Date deliveryTime;
    private Date receiveTime;
    private Date createTime;
    private Date updateTime;
}